package com.le.tester.javaThink.fifth.chapter18_Str;

/**
 * createTime：2021/8/11 17:41
 * description：整型正则匹配
 */
public class IntegerMatch {
    public static void main(String[] args) {
        System.out.println("-1234".matches("-?\\d+"));
        System.out.println("5678".matches("-?\\d+"));
        System.out.println("+911".matches("-?\\d+"));
        System.out.println("+911".matches("(-|\\+)?\\d+"));
    }
}
